package com.mqz.rocketmq.producer.web;

import com.mqz.rocketmq.producer.component.Producer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 版权所有  copyright© 蒙大拿
 *
 * @author mqz
 * @date 2022/7/28
 * @about https://www.gitee.com/DemoMeng
 * @description
 */
@RestController
@RequestMapping(value = "/web/producer")
public class WebController {

    @Resource
    private Producer producer;

    @GetMapping(value = "/test")
    public String test(String message){
        producer.sendMessage("broker-a",message);
        return "OK";
    }







}
